 var keyService = {
    add : function(param, resolve, reject){
        mm.request({
            url     : mm.getServerUrl('/key/add.json'),
            data    : param,
            method  : 'POST',
            success : resolve,
            error   : reject
        });
    },
    delete : function(param, resolve, reject){
        mm.request({
            url     : mm.getServerUrl('/key/delete.json'),
            data    : param,
            method  : 'GET',
            success : resolve,
            error   : reject
        });
    },
    get : function(param, resolve, reject){
        mm.request({
            url     : mm.getServerUrl('/key/get.json'),
            data    : param,
            method  : 'GET',
            success : resolve,
            error   : reject
        });
    },
    /**
     * 查询
     */
    list : function(param, resolve, reject){
        mm.request({
            url     : mm.getServerUrl('/key/list_user.json'),
            data    : param,
            method  : 'POST',
            success : resolve,
            error   : reject
        });
    },

    update : function(param, resolve, reject){
        mm.request({
            url     : mm.getServerUrl('/key/update.json'),
            data    : param,
            method  : 'POST',
            success : resolve,
            error   : reject
        });
    }
}